package edu.umd.ion.wavemeter.service;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * @author pmaunz
 * The measurement result for a single channel
 */
public class WavemeterChannelData implements IsSerializable {
	/**
	 * Wavelength in nm
	 */
	public double Wavelength;
	/**
	 * Wavemeter timestamp (NOT System.currentTimeMillis())
	 */
	public int Timestamp;
	/**
	 * Channel enabled iff active
	 */
	public boolean active = false;
	/**
	 * Auto exposure enabled
	 */
	public boolean AutoExposure = true;
	/**
	 * Exposure time first interferometers
	 */
	public int Exposure1 = 10;	
	/**
	 * Exposure time second interferometers
	 */
	public int Exposure2 = 10;
	/**
	 * Analog Out Voltage of the PID regulator
	 */
	public double AOVoltage;
	public int Avg1, Avg2, Min1, Min2, Max1, Max2;
	/**
	 * Is the Interlock in normal range
	 */
	public boolean InterlockInRange = false;
	/**
	 * Is the interlock enabled
	 */
	public boolean InterlockEnabled = false;
	/**
	 *  Id the channel PID regulator enabled
	 */
	public boolean LockEnabled = false;
	/**
	 * The PIDCourse currently active (as formula)
	 */
	public String PIDCourse;
	/**
	 * The current set wavelength of the PID regulator 
	 */
	public double PIDSetWavelength;
	/**
	 * The currently valid serial number of the InterlockSettings for this channel.
	 * If the client has an older version the client is supposed to poll the new settings.
	 */
	public int InterlockSettingsSerial;
	/**
	 * The currently valid serial number of the PIDSettings for this channel.
	 * If the client has an older version the client is supposed to poll the new settings.
	 */
	public int PIDSettingsSerial;
}
